<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:icecore="http://www.icefaces.org/icefaces/core"
	xmlns:ice="http://www.icesoft.com/icefaces/component"
	xmlns:ace="http://www.icefaces.org/icefaces/components"
	xmlns:prettyfaces="http://ocpsoft.com/prettyfaces"
	xmlns:m="http://code.google.com/p/gmaps4jsf/">
<ui:composition template="/templateEventi.xhtml">
	    <ui:define name="header"> 
	    <meta http-equiv="description" content="Sezione dedicata agli Spettacoli e Concerti di Bologna: info, eventi, appuntamenti da vivere"/>
	    <meta name="keywords" content="eventi a Bologna,Bologna"/>		
		</ui:define>
		<ui:define name="body">
			<h:form id="form1">	
			<br />

			<ice:selectOneRadio value="#{eventiBean.tipSel}" immediate="true" partialSubmit="true"  valueChangeListener="#{eventiBean.onChangeNightTipo}">
				<f:selectItems id="ti" value="#{eventiBean.tipi}" />
			<ace:ajax render="mappaGroup" event="change" />
			</ice:selectOneRadio>
			<br />
			<br />
			<br />
			<ice:panelGroup id="mappaGroup">
			    <m:map id="mappa"  width="990" height="400" latitude="44.486464"  longitude="11.356087" jsVariable="map" zoom="12"   partiallyTriggered="true">
                     <m:mapControl name="GSmallMapControl" />
                    					
 					<ui:repeat id="markEv" value="#{eventiBean.nightlife}" var="mark" >        			
					<m:marker address="#{mark.indirizzo}" rendered="#{eventiBean.tipSel == mark.tipo or eventiBean.tipSel == eventiBean.seleziona }">
					<m:popup icon="snack" content="#{mark.titolo}" />
					</m:marker>
					</ui:repeat>
                   
  				</m:map>
           </ice:panelGroup>
			<section id="content">
				<div class="wrapper">
					<br />
					<h2 class="top-eventi">RightNow</h2>
					<ice:repeat id="eventiNotte" rows="#{eventiBean.numberRows}" value="#{eventiBean.nightlife}" var="nightlife" >
					<ice:portlet styleClass="postBox" rendered="#{eventiBean.tipSel == nightlife.tipo or eventiBean.tipSel == eventiBean.seleziona}">
						<div class="postBoxInner">
							<ice:graphicImage styleClass="rt-img-1 ident-bot-5" url="images/eventi/#{nightlife.foto}" />
							<h2 class="ident-bot-5">
                                   <ice:commandLink actionListener="#{eventiBean.dettaglioListener}"
									action="pretty:nightlifeItem">				
									<f:attribute name="ident" value="#{nightlife}" />
									<ice:outputText value="#{nightlife.titolo}"></ice:outputText>
								</ice:commandLink>
							</h2>
							<div class="ident-bot-6">
								<p><ice:outputText value="#{nightlife.descrizioneBreve}" /></p>
								<div class="meta">
								   <ice:outputText value="#{nightlife.data}">
                   					  <f:convertDateTime pattern="#{eventiBean.DATE_PATTERN}"/>
                   				   </ice:outputText>  
								</div>
							</div>
							<!--<p><a class="button" href="#">read more</a></p>-->
						</div>
						
                         <ice:commandLink actionListener="#{eventiBean.dettaglioListener}"
							action="pretty:nightlifeItem" styleClass="readMore">				
							<f:attribute name="ident" value="#{nightlife}" />
							<ice:outputText value="Read More"></ice:outputText>
						 </ice:commandLink>						
					</ice:portlet>
					</ice:repeat>
				</div>	
			 <div class="wrapper">
	        	<ice:commandLink actionListener="#{eventiBean.rowsListener}"
					styleClass="button">
					<ice:outputText value="Dammene ancora"></ice:outputText>
				</ice:commandLink>                
             </div>
	
			</section><!-- end content -->			
             
    		 </h:form>       
		</ui:define>
	
</ui:composition>
</html>
